package com.my.db.test.mybatis.base;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.TableInfo;
import com.baomidou.mybatisplus.extension.service.IService;
import com.my.core.page.PageInfo;
import com.my.core.page.PageParam;

import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.util.List;

/**
 * @author timo 2021/3/12
 */
public interface BaseService<T> extends IService<T> {
    public TableInfo getTable();

    public PageInfo<T> selectPage(PageParam pageParam, T entity);
    public PageInfo<T> selectPage(PageParam pageParam, Wrapper<T> queryWrapper);

    public boolean deleteLogic(@NotEmpty List<Long> ids);

    public boolean deleteById(Serializable id);

    public boolean changeStatus(@NotEmpty List<Long> ids, Integer status);
}
